package com.by.mapper.purchase;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.by.entity.purchase.PurchaseDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface PurchaseDetailMapper extends BaseMapper<PurchaseDetail> {

    /**
     * 批量保存明细
     * @param purchaseDetails
     * @param pid
     * @return
     */
    int saveBatch(@Param("purchaseDetails") List<PurchaseDetail> purchaseDetails,@Param("pid") String pid);

    /**
     * 根据采购单id查询采购明细
     * @param id
     * @return
     */
    List<PurchaseDetail>  queryByPurchaseId(String id);
}
